package com.webflux.tm.webflux.module.basemodel;

import lombok.Data;

/**
 * @author Surging
 * @version 1.0
 * @ClassName Result
 * @date 2023-05-09 14:21
 * @desc
 */
@Data
public class Result {

    private int code;

    private String message = "success";

    private Object data;

    // 后面result生成器需要以下方法
    public Result setCode(ResultCode resultCode){
        this.code = resultCode.code;
        return this;
    }

    public Result setMessage(String message){
        this.message = message;
        return this;
    }

    public Result setData(Object data){
        this.data = data;
        return this;
    }

}
